package com.ruoyi.teacher.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.teacher.mapper.DegreeMapper;
import com.ruoyi.teacher.domain.Degree;
import com.ruoyi.teacher.service.IDegreeService;

/**
 * 学历学位信息Service业务层处理
 * 
 * @author xiangzy
 * @date 2022-05-08
 */
@Service
public class DegreeServiceImpl implements IDegreeService 
{
    @Autowired
    private DegreeMapper degreeMapper;

    /**
     * 查询学历学位信息
     * 
     * @param recordid 学历学位信息ID
     * @return 学历学位信息
     */
    @Override
    public Degree selectDegreeById(Long recordid)
    {
        return degreeMapper.selectDegreeById(recordid);
    }

    /**
     * 查询学历学位信息列表
     * 
     * @param degree 学历学位信息
     * @return 学历学位信息
     */
    @Override
    public List<Degree> selectDegreeList(Degree degree)
    {
        return degreeMapper.selectDegreeList(degree);
    }

    /**
     * 新增学历学位信息
     * 
     * @param degree 学历学位信息
     * @return 结果
     */
    @Override
    public int insertDegree(Degree degree)
    {
        degree.setCreateTime(DateUtils.getNowDate());
        return degreeMapper.insertDegree(degree);
    }

    /**
     * 修改学历学位信息
     * 
     * @param degree 学历学位信息
     * @return 结果
     */
    @Override
    public int updateDegree(Degree degree)
    {
        degree.setUpdateTime(DateUtils.getNowDate());
        return degreeMapper.updateDegree(degree);
    }

    /**
     * 批量删除学历学位信息
     * 
     * @param recordids 需要删除的学历学位信息ID
     * @return 结果
     */
    @Override
    public int deleteDegreeByIds(Long[] recordids)
    {
        return degreeMapper.deleteDegreeByIds(recordids);
    }

    /**
     * 删除学历学位信息信息
     * 
     * @param recordid 学历学位信息ID
     * @return 结果
     */
    @Override
    public int deleteDegreeById(Long recordid)
    {
        return degreeMapper.deleteDegreeById(recordid);
    }
}
